package com.结构型模型.I装饰者模式;

/**
 * @author zhangjiawen
 * @Date: 2022/6/13 18:01
 */
public class Test {

    public static void main(String[] args) {
        FastFood fireRice=new FriedRice();
        System.out.println(fireRice.getDesc()+"  "+fireRice.cost()+"元");

        System.out.println("=============加个鸡蛋");
        fireRice=new Egg(fireRice);
        System.out.println(fireRice.getDesc()+"  "+fireRice.cost()+"元");


        System.out.println("=============加个培根");
        fireRice=new Bacon(fireRice);
        System.out.println(fireRice.getDesc()+"  "+fireRice.cost()+"元");





    }
}
